3.2.13 \(\int \frac {\cos ^5(c+d x)}{a+i a \tan (c+d x)} \, dx\) [113]

Optimal. Leaf size=85 \[ \frac {6 \sin (c+d x)}{7 a d}-\frac {4 \sin ^3(c+d x)}{7 a d}+\frac {6 \sin ^5(c+d x)}{35 a d}+\frac {i \cos ^5(c+d x)}{7 d (a+i a \tan (c+d x))} \]

[Out]

6/7*sin(d*x+c)/a/d-4/7*sin(d*x+c)^3/a/d+6/35*sin(d*x+c)^5/a/d+1/7*I*cos(d*x+c)^5/d/(a+I*a*tan(d*x+c))

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3583, 2713} \begin {gather*} \frac {6 \sin ^5(c+d x)}{35 a d}-\frac {4 \sin ^3(c+d x)}{7 a d}+\frac {6 \sin (c+d x)}{7 a d}+\frac {i \cos ^5(c+d x)}{7 d (a+i a \tan (c+d x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^5/(a + I*a*Tan[c + d*x]),x]

[Out]

(6*Sin[c + d*x])/(7*a*d) - (4*Sin[c + d*x]^3)/(7*a*d) + (6*Sin[c + d*x]^5)/(35*a*d) + ((I/7)*Cos[c + d*x]^5)/(
d*(a + I*a*Tan[c + d*x]))

Rule 2713

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rule 3583

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[a*(d*
Sec[e + f*x])^m*((a + b*Tan[e + f*x])^n/(b*f*(m + 2*n))), x] + Dist[Simplify[m + n]/(a*(m + 2*n)), Int[(d*Sec[
e + f*x])^m*(a + b*Tan[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, m}, x] && EqQ[a^2 + b^2, 0] && LtQ[n
, 0] && NeQ[m + 2*n, 0] && IntegersQ[2*m, 2*n]

Rubi steps

\begin {align*} \int \frac {\cos ^5(c+d x)}{a+i a \tan (c+d x)} \, dx &=\frac {i \cos ^5(c+d x)}{7 d (a+i a \tan (c+d x))}+\frac {6 \int \cos ^5(c+d x) \, dx}{7 a}\\ &=\frac {i \cos ^5(c+d x)}{7 d (a+i a \tan (c+d x))}-\frac {6 \text {Subst}\left (\int \left (1-2 x^2+x^4\right ) \, dx,x,-\sin (c+d x)\right )}{7 a d}\\ &=\frac {6 \sin (c+d x)}{7 a d}-\frac {4 \sin ^3(c+d x)}{7 a d}+\frac {6 \sin ^5(c+d x)}{35 a d}+\frac {i \cos ^5(c+d x)}{7 d (a+i a \tan (c+d x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.25, size = 94, normalized size = 1.11 \begin {gather*} -\frac {\sec (c+d x) (-350+175 \cos (2 (c+d x))+14 \cos (4 (c+d x))+\cos (6 (c+d x))+350 i \sin (2 (c+d x))+56 i \sin (4 (c+d x))+6 i \sin (6 (c+d x)))}{1120 a d (-i+\tan (c+d x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^5/(a + I*a*Tan[c + d*x]),x]

[Out]

-1/1120*(Sec[c + d*x]*(-350 + 175*Cos[2*(c + d*x)] + 14*Cos[4*(c + d*x)] + Cos[6*(c + d*x)] + (350*I)*Sin[2*(c
 + d*x)] + (56*I)*Sin[4*(c + d*x)] + (6*I)*Sin[6*(c + d*x)]))/(a*d*(-I + Tan[c + d*x]))

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 206 vs. \(2 (75 ) = 150\).
time = 0.30, size = 207, normalized size = 2.44

method result size
risch \(\frac {i {\mathrm e}^{-7 i \left (d x +c \right )}}{448 d a}+\frac {5 i \cos \left (d x +c \right )}{64 d a}+\frac {35 \sin \left (d x +c \right )}{64 d a}+\frac {i \cos \left (5 d x +5 c \right )}{64 d a}+\frac {7 \sin \left (5 d x +5 c \right )}{320 d a}+\frac {3 i \cos \left (3 d x +3 c \right )}{64 d a}+\frac {7 \sin \left (3 d x +3 c \right )}{64 d a}\) \(119\)
derivativedivides \(\frac {-\frac {2}{7 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{7}}+\frac {i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{6}}+\frac {15 i}{8 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}-\frac {11 i}{4 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {21}{10 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}-\frac {11}{4 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {21}{16 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+\frac {i}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{4}}-\frac {i}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{2}}+\frac {1}{10 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{5}}-\frac {1}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{3}}+\frac {11}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )}}{d a}\) \(207\)
default \(\frac {-\frac {2}{7 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{7}}+\frac {i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{6}}+\frac {15 i}{8 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}-\frac {11 i}{4 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {21}{10 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}-\frac {11}{4 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {21}{16 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+\frac {i}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{4}}-\frac {i}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{2}}+\frac {1}{10 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{5}}-\frac {1}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{3}}+\frac {11}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )}}{d a}\) \(207\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^5/(a+I*a*tan(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

2/d/a*(-1/7/(-I+tan(1/2*d*x+1/2*c))^7+1/2*I/(-I+tan(1/2*d*x+1/2*c))^6+15/16*I/(-I+tan(1/2*d*x+1/2*c))^2-11/8*I
/(-I+tan(1/2*d*x+1/2*c))^4+21/20/(-I+tan(1/2*d*x+1/2*c))^5-11/8/(-I+tan(1/2*d*x+1/2*c))^3+21/32/(-I+tan(1/2*d*
x+1/2*c))+1/8*I/(tan(1/2*d*x+1/2*c)+I)^4-1/4*I/(tan(1/2*d*x+1/2*c)+I)^2+1/20/(tan(1/2*d*x+1/2*c)+I)^5-1/4/(tan
(1/2*d*x+1/2*c)+I)^3+11/32/(tan(1/2*d*x+1/2*c)+I))

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5/(a+I*a*tan(d*x+c)),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: Error executing code in Maxima: expt: undefined: 0 to a negative e
xponent.

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 85, normalized size = 1.00 \begin {gather*} \frac {{\left (-7 i \, e^{\left (12 i \, d x + 12 i \, c\right )} - 70 i \, e^{\left (10 i \, d x + 10 i \, c\right )} - 525 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 700 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 175 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 42 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 5 i\right )} e^{\left (-7 i \, d x - 7 i \, c\right )}}{2240 \, a d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5/(a+I*a*tan(d*x+c)),x, algorithm="fricas")

[Out]

1/2240*(-7*I*e^(12*I*d*x + 12*I*c) - 70*I*e^(10*I*d*x + 10*I*c) - 525*I*e^(8*I*d*x + 8*I*c) + 700*I*e^(6*I*d*x
 + 6*I*c) + 175*I*e^(4*I*d*x + 4*I*c) + 42*I*e^(2*I*d*x + 2*I*c) + 5*I)*e^(-7*I*d*x - 7*I*c)/(a*d)

________________________________________________________________________________________

Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 264 vs. \(2 (68) = 136\).
time = 0.33, size = 264, normalized size = 3.11 \begin {gather*} \begin {cases} \frac {\left (- 150323855360 i a^{6} d^{6} e^{21 i c} e^{5 i d x} - 1503238553600 i a^{6} d^{6} e^{19 i c} e^{3 i d x} - 11274289152000 i a^{6} d^{6} e^{17 i c} e^{i d x} + 15032385536000 i a^{6} d^{6} e^{15 i c} e^{- i d x} + 3758096384000 i a^{6} d^{6} e^{13 i c} e^{- 3 i d x} + 901943132160 i a^{6} d^{6} e^{11 i c} e^{- 5 i d x} + 107374182400 i a^{6} d^{6} e^{9 i c} e^{- 7 i d x}\right ) e^{- 16 i c}}{48103633715200 a^{7} d^{7}} & \text {for}\: a^{7} d^{7} e^{16 i c} \neq 0 \\\frac {x \left (e^{12 i c} + 6 e^{10 i c} + 15 e^{8 i c} + 20 e^{6 i c} + 15 e^{4 i c} + 6 e^{2 i c} + 1\right ) e^{- 7 i c}}{64 a} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**5/(a+I*a*tan(d*x+c)),x)

[Out]

Piecewise(((-150323855360*I*a**6*d**6*exp(21*I*c)*exp(5*I*d*x) - 1503238553600*I*a**6*d**6*exp(19*I*c)*exp(3*I
*d*x) - 11274289152000*I*a**6*d**6*exp(17*I*c)*exp(I*d*x) + 15032385536000*I*a**6*d**6*exp(15*I*c)*exp(-I*d*x)
 + 3758096384000*I*a**6*d**6*exp(13*I*c)*exp(-3*I*d*x) + 901943132160*I*a**6*d**6*exp(11*I*c)*exp(-5*I*d*x) +
107374182400*I*a**6*d**6*exp(9*I*c)*exp(-7*I*d*x))*exp(-16*I*c)/(48103633715200*a**7*d**7), Ne(a**7*d**7*exp(1
6*I*c), 0)), (x*(exp(12*I*c) + 6*exp(10*I*c) + 15*exp(8*I*c) + 20*exp(6*I*c) + 15*exp(4*I*c) + 6*exp(2*I*c) +
1)*exp(-7*I*c)/(64*a), True))

________________________________________________________________________________________

Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 171 vs. \(2 (73) = 146\).
time = 0.50, size = 171, normalized size = 2.01 \begin {gather*} \frac {\frac {7 \, {\left (55 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 180 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 250 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 160 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 43\right )}}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + i\right )}^{5}} + \frac {735 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 3360 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 7315 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 8820 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6321 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 2492 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 461}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}^{7}}}{560 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5/(a+I*a*tan(d*x+c)),x, algorithm="giac")

[Out]

1/560*(7*(55*tan(1/2*d*x + 1/2*c)^4 + 180*I*tan(1/2*d*x + 1/2*c)^3 - 250*tan(1/2*d*x + 1/2*c)^2 - 160*I*tan(1/
2*d*x + 1/2*c) + 43)/(a*(tan(1/2*d*x + 1/2*c) + I)^5) + (735*tan(1/2*d*x + 1/2*c)^6 - 3360*I*tan(1/2*d*x + 1/2
*c)^5 - 7315*tan(1/2*d*x + 1/2*c)^4 + 8820*I*tan(1/2*d*x + 1/2*c)^3 + 6321*tan(1/2*d*x + 1/2*c)^2 - 2492*I*tan
(1/2*d*x + 1/2*c) - 461)/(a*(tan(1/2*d*x + 1/2*c) - I)^7))/d

________________________________________________________________________________________

Mupad [B]
time = 7.10, size = 188, normalized size = 2.21 \begin {gather*} \frac {\left (-35\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}\,35{}\mathrm {i}-35\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,105{}\mathrm {i}-126\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,182{}\mathrm {i}+26\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,130{}\mathrm {i}-15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,55{}\mathrm {i}+25\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+5{}\mathrm {i}\right )\,2{}\mathrm {i}}{35\,a\,d\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1{}\mathrm {i}\right )}^5\,{\left (1+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}\right )}^7} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^5/(a + a*tan(c + d*x)*1i),x)

[Out]

((25*tan(c/2 + (d*x)/2) + tan(c/2 + (d*x)/2)^2*55i - 15*tan(c/2 + (d*x)/2)^3 + tan(c/2 + (d*x)/2)^4*130i + 26*
tan(c/2 + (d*x)/2)^5 + tan(c/2 + (d*x)/2)^6*182i - 126*tan(c/2 + (d*x)/2)^7 + tan(c/2 + (d*x)/2)^8*105i - 35*t
an(c/2 + (d*x)/2)^9 + tan(c/2 + (d*x)/2)^10*35i - 35*tan(c/2 + (d*x)/2)^11 + 5i)*2i)/(35*a*d*(tan(c/2 + (d*x)/
2) + 1i)^5*(tan(c/2 + (d*x)/2)*1i + 1)^7)

________________________________________________________________________________________